package com.icbc.errors.annotation;

import org.springframework.http.HttpStatus;

import java.lang.annotation.*;

@Inherited
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExceptionMapping {

    /**
     * Corresponding HTTP status code for this particular exception.
     *
     * @return The error code.
     */
    String errorCode();

    /**
     * The mapping error code for this exception.
     *
     * @return The status code.
     */
    HttpStatus statusCode();
}
